package com.sdy.resdir.biz.mapper;

import com.sdy.resdir.biz.model.RdIpUpdateApplication;
import com.sdy.mvc.mapper.BaseMapper;
import com.sdy.resdir.biz.param.IpApplyParam;
import com.sdy.resdir.biz.vo.IpApplyListVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * ip修改申请 Mapper 接口
 * </p>
 *
 * @author hyh
 * @since 2019-10-28
 */
public interface RdIpUpdateApplicationMapper extends BaseMapper<RdIpUpdateApplication> {


    /**
     * 用户查询IP修改申请单列表,如果传入了ipOrderIdList则根据ID列表来查
     *
     * @param param
     * @return
     */
    List<IpApplyListVo> getUserIpApplyList(IpApplyParam param);

    /**
     * 获取总条数
     *
     * @param param  只需要(userId,name,ip,state)
     * @return
     */
    int getUserIpApplyListTotal(IpApplyParam param);

    /**
     * 批量更新订单状态
     *
     * @param list
     * @return
     */
    int batchUpdate(@Param("list") List<RdIpUpdateApplication> list);

    /**
     * 批量生产ip修改申请单
     * @param newApplyList
     * @return
     */
    boolean batchInsert(List<RdIpUpdateApplication> newApplyList);
}
